<!--
 * @Description: 
 * @Author: xuqi
 * @Github: https://github.com/knight-peter
 * @LastEditors: xuqi
 -->
<script type="text/html" template>
  <link rel="stylesheet" href="{{ layui.setter.base }}assets/css/m-global.css?v={{layui.cache.version}}" media="all">
  <link rel="stylesheet" href="{{ layui.setter.base }}assets/plugins/city-picker/city-picker.css" media="all">
  <script src="{{ layui.setter.base }}assets/plugins/city-picker/city-picker.data.js"></script>
</script>
<title>
  首页</title>

<div class="layui-card layadmin-header">
  <div class="layui-breadcrumb" lay-filter="breadcrumb">
    <a lay-href>
      <cite>首页</cite>
    </a>
    <a>
      <cite>用户管理</cite>
    </a>
  </div>
</div>

<div class="layui-fluid">
  <div class="layui-card">
    <header class="layui-card-header">用户管理</header>
    <form class="layui-form layui-card-body">
      <div class="layui-row layui-col-space10 layui-form-item">
        <div class="layui-col-lg3 layui-col-md6">
          <label for="" class="layui-form-label">用户编号</label>
          <div class="layui-input-block">
            <input type="text" name="number" class="layui-input" placeholder="请输入" autocomplete="off">
          </div>
        </div>
        <div class="layui-col-lg3 layui-col-md6">
          <label for="" class="layui-form-label">姓名</label>
          <div class="layui-input-block">
            <input type="text" name="realname" class="layui-input" placeholder="请输入" autocomplete="off">
          </div>
        </div>
        <div class="layui-col-lg3 layui-col-md6">
          <label for="" class="layui-form-label">手机</label>
          <div class="layui-input-block">
            <input type="text" name="mobile" class="layui-input" placeholder="请输入" autocomplete="off">
          </div>
        </div>
        <div class="layui-col-lg3 layui-col-md6">
          <label for="" class="layui-form-label">上级编号</label>
          <div class="layui-input-block">
            <input type="text" name="father_number" class="layui-input" placeholder="请输入" autocomplete="off">
          </div>
        </div>
        <div class="layui-col-lg3 layui-col-md6">
          <label for="" class="layui-form-label">是否董事</label>
          <div class="layui-input-block">
            <input type="radio" name="is_agent" title="是" value="1">
            <input type="radio" name="is_agent" title="否" value="0">
          </div>
        </div>
        <div class="layui-col-lg3 layui-col-md6">
          <label for="" class="layui-form-label">是否联创</label>
          <div class="layui-input-block">
            <input type="radio" name="is_founder" title="是" value="1">
            <input type="radio" name="is_founder" title="否" value="0">
          </div>
        </div>
        <div class="layui-col-lg3 layui-col-md6">
          <label for="" class="layui-form-label">是否区代</label>
          <div class="layui-input-block">
            <input type="radio" name="is_area_agent" title="是" value="1">
            <input type="radio" name="is_area_agent" title="否" value="0">
          </div>
        </div>
      </div>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn js-table-search" lay-submit lay-filter="js-btn-table-search">查询</button>
          <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
      </div>
    </form>
    <div class="layui-card-body">
      <table id="tableList" lay-filter="tableList"></table>
      <script type="text/html" id="theadToolbar">
        <a href="javascript:;" lay-event="add" class="layui-btn">新增</a>
      </script>
      <script type="text/html" id="trToolbar">
        <a class="layui-btn layui-btn-xs" lay-event="detail">查看</a>
        {{# if(!d.parent_number){ }}
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="bind_parent_number">绑定上级编号</a>
        {{# } }}
        <!-- <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a> -->
        <!-- <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a> -->
      </script>
      <script type="text/html" id="trToolbarbarSide">
        {{# if(d.parent_number){ }}
          {{# if(d.is_agent==0){ }}
            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="open_agent">直接开通董事</a>
            {{# } }}
            <!-- <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="open_founder">直接开通联创</a> -->
            {{# if(d.is_area_agent==0){ }}
            <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="open_area_agent">直接开通区代</a>
          {{# } }}
        {{# }else{ }}
          请先绑定上级编号
        {{# }}}
      </script>
    </div>
  </div>
</div>

<script>
  layui.use('m-user', layui.factory('m-user'));
</script>